
 #import <QuartzCore/QuartzCore.h>
#import <OpenGLES/EAGLDrawable.h>
#import "GameViewController.h"
#import "GameView.h"
@implementation GameViewController

- (void)paintScreen{
    
}
- (void)stateMachine{
    
}
#pragma mark Event Handling Methods




// Implement viewDidLoad to do additional setup after loading the view, typically from a nib.
- (void)viewDidLoad {
    [super viewDidLoad];
	gameTimer = [NSTimer scheduledTimerWithTimeInterval:0.3 target:self selector:@selector(gameLoop) userInfo:nil repeats:YES];
}	



- (void)gameLoop{
	[self stateMachine];
	//if (update==0) {
	[self.view setNeedsDisplay];
	[currentScreen setNeedsDisplay];
	[self.view setNeedsLayout];
	[currentScreen setNeedsLayout];
	/*	update=5;
	}else {
		update--;
	}*/

}
-(void) action:(int)x y:(int)y{
}


- (void)pause{
	[gameTimer invalidate];
}
- (void)resume{
	gameTimer = [NSTimer scheduledTimerWithTimeInterval:0.3 target:self selector:@selector(gameLoop) userInfo:nil repeats:YES];

//	[gameTimer fire];
}


@end
